Skip to content

feat(NoBlockedMessages): Remove replies to blocked messages#4190

Draft
n1ckoates wants to merge 1 commit into
Vendicated:mainfrom
n1ckoates:removed-replies
Draft

feat(NoBlockedMessages): Remove replies to blocked messages#4190
n1ckoates wants to merge 1 commit into
Vendicated:mainfrom
n1ckoates:removed-replies

Conversation

@n1ckoates
Copy link
Copy Markdown
Contributor

Closes #4182

This is my first time writing patch regexes for Vencord, so hopefully I'm doing this right. Apologies if not.

I initially thought this would be a pretty simple task but it required a lot more code than I had anticipated.

  • Patches the Message component to check if its a reply to a blocked user and return null if so.
  • That check uses ReplyStore to lookup message references, because messages being replied to often weren't in MessageStore in my testing, especially when they were old. So there's additional patches to get access to ReplyStore.
  • Added flux handlers for relationship updates that just sends stub message updates for the current channel. Otherwise, when you blocked someone messages wouldn't re-render until you navigated away from the channel and back. If that's an ok tradeoff though, I'm happy to remove the flux handlers to make the code simpler.

@sillyElvy
Copy link
Copy Markdown
Contributor

From my experience just patching readstatestore and messagestore is absolutely enough to filter out replies, it's the first two patches, just put an or into the if and see if that works if you didn't already (worked fine for me the last time I worked on #3035)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request - Hiding replies to blocked users

2 participants